package com.eian.boot.web.controller;


import com.eian.boot.common.core.model.CommonResult;
import com.eian.boot.common.id.IdHelper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author alex.meng
 * @createTime 2025-09-25
 * @description 非业务通用API
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    /**
     * @author alex.meng
     * @description 获取请求唯一标识，用于防重提交
     */
    @GetMapping("/unique-id")
    public CommonResult<String> generateUniqueId() {
        return CommonResult.okStr(IdHelper.simpleUuid());
    }
}
